using CommunityToolkit.Aspire.Hosting.Dapr;

var builder = DistributedApplication.CreateBuilder(args);



//var cache = builder.AddRedis("cache");

var cache = builder.AddConnectionString("cache");

var apidemo = builder.AddProject<Projects.AspireComposeDemo_ApiDemo>("apidemo")
    .WaitFor(cache)
    .WithReference(cache);


builder.AddProject<Projects.AspireComposeDemo_Web>("webfrontend")
    .WithExternalHttpEndpoints()
    .WithReference(cache)
    .WaitFor(cache)
    .WithReference(apidemo);


builder.Build().Run();
